home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / websrvcs / nsISOAPCall.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  9KB  |  229 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISOAPCall.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISOAPCall_h__
  6. #define __gen_nsISOAPCall_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISOAPMessage_h__
  14. #include "nsISOAPMessage.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. class nsISOAPResponse; /* forward declaration */
  22.  
  23. class nsISOAPResponseListener; /* forward declaration */
  24.  
  25. class nsISOAPCallCompletion; /* forward declaration */
  26.  
  27.  
  28. /* starting interface:    nsISOAPCall */
  29. #define NS_ISOAPCALL_IID_STR "a8fefe40-52bc-11d4-9a57-000064657374"
  30.  
  31. #define NS_ISOAPCALL_IID \
  32.   {0xa8fefe40, 0x52bc, 0x11d4, \
  33.     { 0x9a, 0x57, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}
  34.  
  35. /**
  36.  * This interface is a convenience extension of the basic SOAP message,
  37.  * which handles common patterns of calling, such as providing an
  38.  * action URI in the HTTP header, locating and invoking the appropriate
  39.  * transport based upon the protocol of the transportURI, and
  40.  * automatically recieving the result in a new nsISOAPResponse object
  41.  * which recieves an XML message.
  42.  */
  43. class NS_NO_VTABLE nsISOAPCall : public nsISOAPMessage {
  44.  public: 
  45.  
  46.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISOAPCALL_IID)
  47.  
  48.   /**
  49.    * The URI to which the message will be sent, identifying the
  50.    *   transport and transport-specific information about the
  51.    *   destination.
  52.    * This does not have to match the <code>targetObjectURI</code>.
  53.    */
  54.   /* attribute AString transportURI; */
  55.   NS_IMETHOD GetTransportURI(nsAString & aTransportURI) = 0;
  56.   NS_IMETHOD SetTransportURI(const nsAString & aTransportURI) = 0;
  57.  
  58.   /**
  59.    * Enables alternative security model which may be available
  60.    *   from participating services.  Securely adds a 
  61.    *   "verifySource" header to the outgoing message with 
  62.    *   "mustUnderstand" enabled, which permits the server to 
  63.    *   decide whether the call should be honored from that 
  64.    *   particular source.  i
  65.    * <p>When this verification header is enabled, the 
  66.    *   calling script is released from the draconion 
  67.    *   security checks of unverified SOAP calls.  But
  68.    *   the service being invoked must not reject the
  69.    *   message, which is the prescribed action if a SOAP
  70.    *   server receives a header of type "mustUnderstand" that
  71.    *   it does not understand.
  72.    * <p>Servers which accept "verified" messages
  73.    *   containing this header relieve the user of having to
  74.    *   configure and trust the domain of the web page never 
  75.    *   to exploit behind his firewall, because the
  76.    *   responsibility is assumed by the service.  If the
  77.    *   service is not behind a firewall, then merely
  78.    *   ignoring the packet is enough to free all
  79.    *   users of this facility to call the server whatever
  80.    *   their security configurations for unverified calls
  81.    *   may be.  But it only works with services that 
  82.    *   accept these verifySource headers.
  83.    * <p>It is possible for a user to disable even verified
  84.    *   SOAP calls, but this is not the default setting.
  85.    */
  86.   /* attribute boolean verifySourceHeader; */
  87.   NS_IMETHOD GetVerifySourceHeader(PRBool *aVerifySourceHeader) = 0;
  88.   NS_IMETHOD SetVerifySourceHeader(PRBool aVerifySourceHeader) = 0;
  89.  
  90.   /**
  91.    * Synchronously invoke the call. The method returns only when 
  92.    * we receive a response (or an error occurs).  The
  93.    * <code>transportURI</code> must have been set, the 
  94.    * parameter list (even if empty) must have been encoded,
  95.    * and the transportURI must use some known protocol.  A
  96.    * synchronous call assumes that there will be exactly one
  97.    * response per call.
  98.    *
  99.    * If not, an error is returned in the status of the response.
  100.    *
  101.    * @returns The SOAP response
  102.    */
  103.   /* nsISOAPResponse invoke (); */
  104.   NS_IMETHOD Invoke(nsISOAPResponse **_retval) = 0;
  105.  
  106.   /**
  107.    * Asynchronously invoke the call. At this point, the document
  108.    * rooted by the Envelope element is encoded to form the body
  109.    * of the SOAP message. The method returns immediately, and the
  110.    * listener is invoked when we eventually receive a response
  111.    * (or error or successful completion). The
  112.    * <code>transportURI</code> must have been set, the 
  113.    * parameter list (even if empty) must have been encoded,
  114.    * and the transportURI must use some known protocol.
  115.    *
  116.    * If not, an error is returned in the status of the response.
  117.    *
  118.    * @param aListener Handler to be invoked asynchronously after the
  119.    *  response is recieved.  Should be null if no response is
  120.    *  expected.
  121.    */
  122.   /* nsISOAPCallCompletion asyncInvoke (in nsISOAPResponseListener aListener); */
  123.   NS_IMETHOD AsyncInvoke(nsISOAPResponseListener *aListener, nsISOAPCallCompletion **_retval) = 0;
  124.  
  125. };
  126.  
  127. /* Use this macro when declaring classes that implement this interface. */
  128. #define NS_DECL_NSISOAPCALL \
  129.   NS_IMETHOD GetTransportURI(nsAString & aTransportURI); \
  130.   NS_IMETHOD SetTransportURI(const nsAString & aTransportURI); \
  131.   NS_IMETHOD GetVerifySourceHeader(PRBool *aVerifySourceHeader); \
  132.   NS_IMETHOD SetVerifySourceHeader(PRBool aVerifySourceHeader); \
  133.   NS_IMETHOD Invoke(nsISOAPResponse **_retval); \
  134.   NS_IMETHOD AsyncInvoke(nsISOAPResponseListener *aListener, nsISOAPCallCompletion **_retval); 
  135.  
  136. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  137. #define NS_FORWARD_NSISOAPCALL(_to) \
  138.   NS_IMETHOD GetTransportURI(nsAString & aTransportURI) { return _to GetTransportURI(aTransportURI); } \
  139.   NS_IMETHOD SetTransportURI(const nsAString & aTransportURI) { return _to SetTransportURI(aTransportURI); } \
  140.   NS_IMETHOD GetVerifySourceHeader(PRBool *aVerifySourceHeader) { return _to GetVerifySourceHeader(aVerifySourceHeader); } \
  141.   NS_IMETHOD SetVerifySourceHeader(PRBool aVerifySourceHeader) { return _to SetVerifySourceHeader(aVerifySourceHeader); } \
  142.   NS_IMETHOD Invoke(nsISOAPResponse **_retval) { return _to Invoke(_retval); } \
  143.   NS_IMETHOD AsyncInvoke(nsISOAPResponseListener *aListener, nsISOAPCallCompletion **_retval) { return _to AsyncInvoke(aListener, _retval); } 
  144.  
  145. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  146. #define NS_FORWARD_SAFE_NSISOAPCALL(_to) \
  147.   NS_IMETHOD GetTransportURI(nsAString & aTransportURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTransportURI(aTransportURI); } \
  148.   NS_IMETHOD SetTransportURI(const nsAString & aTransportURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTransportURI(aTransportURI); } \
  149.   NS_IMETHOD GetVerifySourceHeader(PRBool *aVerifySourceHeader) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVerifySourceHeader(aVerifySourceHeader); } \
  150.   NS_IMETHOD SetVerifySourceHeader(PRBool aVerifySourceHeader) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetVerifySourceHeader(aVerifySourceHeader); } \
  151.   NS_IMETHOD Invoke(nsISOAPResponse **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Invoke(_retval); } \
  152.   NS_IMETHOD AsyncInvoke(nsISOAPResponseListener *aListener, nsISOAPCallCompletion **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncInvoke(aListener, _retval); } 
  153.  
  154. #if 0
  155. /* Use the code below as a template for the implementation class for this interface. */
  156.  
  157. /* Header file */
  158. class nsSOAPCall : public nsISOAPCall
  159. {
  160. public:
  161.   NS_DECL_ISUPPORTS
  162.   NS_DECL_NSISOAPCALL
  163.  
  164.   nsSOAPCall();
  165.  
  166. private:
  167.   ~nsSOAPCall();
  168.  
  169. protected:
  170.   /* additional members */
  171. };
  172.  
  173. /* Implementation file */
  174. NS_IMPL_ISUPPORTS1(nsSOAPCall, nsISOAPCall)
  175.  
  176. nsSOAPCall::nsSOAPCall()
  177. {
  178.   /* member initializers and constructor code */
  179. }
  180.  
  181. nsSOAPCall::~nsSOAPCall()
  182. {
  183.   /* destructor code */
  184. }
  185.  
  186. /* attribute AString transportURI; */
  187. NS_IMETHODIMP nsSOAPCall::GetTransportURI(nsAString & aTransportURI)
  188. {
  189.     return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191. NS_IMETHODIMP nsSOAPCall::SetTransportURI(const nsAString & aTransportURI)
  192. {
  193.     return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195.  
  196. /* attribute boolean verifySourceHeader; */
  197. NS_IMETHODIMP nsSOAPCall::GetVerifySourceHeader(PRBool *aVerifySourceHeader)
  198. {
  199.     return NS_ERROR_NOT_IMPLEMENTED;
  200. }
  201. NS_IMETHODIMP nsSOAPCall::SetVerifySourceHeader(PRBool aVerifySourceHeader)
  202. {
  203.     return NS_ERROR_NOT_IMPLEMENTED;
  204. }
  205.  
  206. /* nsISOAPResponse invoke (); */
  207. NS_IMETHODIMP nsSOAPCall::Invoke(nsISOAPResponse **_retval)
  208. {
  209.     return NS_ERROR_NOT_IMPLEMENTED;
  210. }
  211.  
  212. /* nsISOAPCallCompletion asyncInvoke (in nsISOAPResponseListener aListener); */
  213. NS_IMETHODIMP nsSOAPCall::AsyncInvoke(nsISOAPResponseListener *aListener, nsISOAPCallCompletion **_retval)
  214. {
  215.     return NS_ERROR_NOT_IMPLEMENTED;
  216. }
  217.  
  218. /* End of implementation class template. */
  219. #endif
  220.  
  221. #define NS_SOAPCALL_CID                             \
  222. { /* 87d21ec0-539d-11d4-9a59-00104bdf5339 */        \
  223.   0x87d21ec0, 0x539d, 0x11d4,                       \
  224.  {0x9a, 0x59, 0x00, 0x10, 0x4b, 0xdf, 0x53, 0x39} }
  225. #define NS_SOAPCALL_CONTRACTID \
  226. "@mozilla.org/xmlextras/soap/call;1"
  227.  
  228. #endif /* __gen_nsISOAPCall_h__ */
  229.